{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <div class="form form-horizontal">
        <div class="row cl">
            <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>图片：</label>
            <div class="formControls col-xs-6 col-sm-6">
                <input type="text" class="input-text" id="upload" placeholder="请点击后面的上传按钮" datatype="*" nullmsg="请填写图片url" style="width: 70%">
                <button type="button" class="btn btn-primary radius" onclick="layer_open('文件上传','{:\\think\\Url::build(\'Upload/index\', [\'id\' => \'upload\'])}')">上传</button>
                <a onclick="$(this).attr('href', $('#upload').val())" type="button" class="btn btn-success radius" data-lightbox="preview">预览</a>
            </div>
            <div class="col-xs-3 col-sm-3"></div>
        </div>
    </div>
    <div id="markdown" class="mt-20"></div>
</div>
{/block}
{block name="style"}
<link rel="stylesheet" href="__LIB__/lightbox2/css/lightbox.min.css">
{/block}
{block name="script"}
<script src="__LIB__/lightbox2/js/lightbox.min.js"></script>
<script>

</script>
{literal}
<script type="text/plain" id="markdown_tpl">
---
图片上传使用的是 H5 + iframe 兼容模式上传，不依赖 flash 实现无刷新上传，同时支持 H5 的拖拽上传和上传进度监听，支持表单直接提交上传文件


html 代码：
```
<div class="form form-horizontal">
    <div class="row cl">
        <label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>图片：</label>
        <div class="formControls col-xs-6 col-sm-6">
            <input type="text" class="input-text" id="upload" placeholder="请点击后面的上传按钮" datatype="*" nullmsg="请填写图片url" style="width: 70%">
            <button type="button" class="btn btn-primary radius" onclick="layer_open('文件上传','{:\\think\\Url::build(\'Upload/index\', [\'id\' => \'upload\'])}')">上传</button>
            <a onclick="$(this).attr('href', $('#upload').val())" type="button" class="btn btn-success radius" data-lightbox="preview">预览</a>
        </div>
        <div class="col-xs-3 col-sm-3"></div>
    </div>
</div>
```
</script>
{/literal}
{/block}